<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script type="text/javascript">
			/**
			 * 两个数加和
			 * @param {Object} numa
			 * @param {Object} numb
			 */
			function plus(numa ,numb){
				return numa +numb;
			}
			
			/**
			 * 减法
			 * @param {Object} numa
			 * @param {Object} numb
			 */
			function sub(numa ,numb){
				return numa - numb;
			}
			
			var na = 100;
			var nb = 30;
			
			/**
			 * @param {Object} na
			 * @param {Object} mb
			 * @param {Object} opera对两个数字进行运算
			 */
			function operation(nua,nub ,opera){
				console.log("opera(nua,nub): "+opera(nua,nub));
			}
			
			operation(na,nb,sub);
			console.log("传递匿名的function")
			operation(na,nb,function(numa ,numb){
				return numa * numb;
			});
			console.log("传递匿名的function2")
			operation(na,nb,(numa ,numb)=>{
				return numa / numb;
			});
			
			console.log("传递匿名的function3")
			operation(na,nb,(numa ,numb)=>  numa / numb );
			//如果箭头函数里面只有一个入参，可以不用小括号
			// operation(na,nb,numa =>  numa / numb );
			
			operation(na,nb,()=>  {console.log("无参的箭头函数") } );
			
			
			// Lambda表达式
			
		</script>
	</head>
	<body>
	</body>
</html>
